package com.xiaojie.persistence.core.session;

import com.xiaojie.persistence.core.entity.Configuration;
import com.xiaojie.persistence.core.entity.MappedStatement;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 小杰
 * @date 2021/5/5
 * @description 执行者,实际上的sql执行者
 */
public interface Executor {

    int update(Configuration configuration, MappedStatement mappedStatement, Object[] args) throws NoSuchFieldException, IllegalAccessException, SQLException;

    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object[] args) throws SQLException, NoSuchFieldException, IllegalAccessException, InstantiationException, IntrospectionException, InvocationTargetException;

}
